package com.zrf.testchatgpt.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author zrf
 * @since 2023-03-15
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class Users implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.AUTO)
      private Integer id;

    private String wxName;

    private Integer wxPhone;

    private String headImage;
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    private String userOpenid;
    private String userCode;
    @TableField(exist = false)
    private String prompt;
    @TableField(exist = false)
    private String sessionId;
    @TableField(exist = false)
    private String accessToken;
    @TableField(exist = false)
    private String refreshToken;
    public String getPrompt() {
        return prompt;
    }

    public Users setPrompt(String prompt) {
        this.prompt = prompt;
        return this;
    }

    public String getJs_code() {
        return js_code;
    }

    public Users setJs_code(String js_code) {
        this.js_code = js_code;
        return this;
    }

    @TableField(exist = false)
    private String js_code;

    private Integer userAnswerNum;
    private String role;

}
